package com.order.service.impl;

import com.order.dao.Desk;
import com.order.mapper.DeskMapper;
import com.order.service.DeskService;
import lombok.AllArgsConstructor;

import org.springframework.stereotype.Service;


import java.util.List;

@Service
@AllArgsConstructor
public class DeskServiceImpl implements DeskService {

    private  DeskMapper deskMapper;
    @Override
    public List<Desk> getDesks(Desk desk) {
        return deskMapper.getDesksMapper(desk);
    }

    @Override
    public int judgment(String name) {
        return deskMapper.judgment(name);
    }

    @Override
    public int addDesk(Desk desk) {
        return deskMapper.addDeskMapper(desk);
    }

    @Override
    public int deleteDesk(int id) {
        return deskMapper.deleteDeskMapper(id);
    }

    @Override
    public int changeStatus(Desk desk) {
        return deskMapper.changeStatusMapper(desk);
    }

    @Override
    public Desk selectDesk(int id) {
        return deskMapper.selectDesk(id);
    }
}
